package com.liachen.stock.entity;

import lombok.Data;

import java.util.List;

/**
 * 研报
 *
 * @author d85v8h9 chen.liang
 * @date 2021/4/2 11:07
 * @since V1.0
 */
@Data
public class Report {
    /**
     * publishTime : 2021-03-31T16:00:00.000+0000
     * dataStr : 04-01 昨天
     * orgName : 光大证券
     * code : 000002.SZ
     * author : 何缅南
     * companyName : 万科A
     * industry : 房地产
     * url : https://cheesestock.oss-cn-qingdao.aliyuncs.com/cheese/report/2021-04-01/H3_AP202104011480008407_1.pdf
     * highlightTitle : 2020年度业绩点评报告：多元化经营板块表现出色，地产开发基本盘维持稳健
     * ratingType : 买入
     * authorList : [{"name":"何缅南","isStarAuthor":false}]
     * id : 84280
     * idx : 20210401000084280
     */

    private String publishTime;
    private String dataStr;
    private String orgName;
    private String code;
    private String author;
    private String companyName;
    private String industry;
    private String url;
    private String highlightTitle;
    private String ratingType;
    private int id;
    private String idx;
    private List<ReportAuthor> authorList;

    public boolean isStarAuthor() {
        return this.getAuthorList().stream().filter(ReportAuthor::getStarAuthor).count() > 0;
    }
}
